package org.jeecg.modules.golf.question.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.golf.question.client.QuestionTypeAnalysisDTO;
import org.jeecg.modules.golf.question.client.qto.StatisticsQuestionAnalysisQueryDTO;
import org.jeecg.modules.golf.question.entity.QuestionTypeMapping;

import java.util.List;

/**
 * @Description: 问题分类方案关联表
 * @Author: jeecg-boot
 * @Date:   2020-10-18
 * @Version: V1.0
 */
public interface QuestionTypeMappingMapper extends BaseMapper<QuestionTypeMapping> {

	 boolean deleteByMainId(@Param("mainId") Long mainId);

	 List<QuestionTypeMapping> selectByMainId(@Param("mainId") Long mainId);

	/**
	 * 查询问题分类批量
	 * @param mappingIdList
	 * @return
	 */
	List<QuestionTypeMapping> selectByMappingIdList(@Param("mappingIdList") List<Long> mappingIdList,@Param("mappingType") Integer mappingType);


	/**
	 * 问题分类
	 * @param statisticsQuestionAnalysisQueryDTO
	 * @return
	 */
	List<QuestionTypeAnalysisDTO> typeDistAnalysis(StatisticsQuestionAnalysisQueryDTO statisticsQuestionAnalysisQueryDTO);
}
